<%@ page language="java" contentType="text/html; charset=UTF-8"
	session="true" buffer="100kb" autoFlush="true"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%!
	public void jspInit() {
		System.out.println("INited");
	}
	public void jspDestroy() {
	   System.out.println("DEASTOYED");
	}
	%>
	<jsp:scriptlet>
		String name = (String)session.getAttribute("name");
		// No name placed in the session; yet.
		if(name == null) {
		   String reqName = request.getParameter("name");
		   if(reqName != null) {
		      session.setAttribute("name", reqName);
		      name = reqName;
		   }
		}
		out.println("Welcome " + (name == null ? "Anonymous" : name));
		for(int i = 0; i < 10000; ++i) {
		   if(i == 9999) {
		      throw new Error("D");
		      //request.getRequestDispatcher("/jsp/second.jsp").forward(request, response);
		   }
		   out.println("Hello world this is me for you");
		}
	</jsp:scriptlet>
</body>
</html>